package com.carful.xigua.modules.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.carful.xigua.modules.user.entity.Record;
import com.carful.xigua.modules.user.entity.User;
import com.carful.xigua.modules.user.mapper.RecordMapper;
import com.carful.xigua.modules.user.service.IRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 领取记录表 服务实现类
 * </p>
 *
 * @author ad
 * @since 2024-07-12
 */
@Service
public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService {
    @Override
    public List<Record> getList(User user) {
        LambdaQueryWrapper<Record> queryWrapper = new LambdaQueryWrapper<Record>()
                .eq(Record::getPhone, user.getUserPhone());
        return list(queryWrapper);
    }
}
